<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>首页</title>

<style type="text/css">
#portrait{
		display: inline-block;
		width: 100px;
		height: 100px;
		background:url(${pageContext.request.contextPath}/img/tx.jpg);
		float: left;
	}
	
	#portrait img{
		width: 100px;
		height: 100px;
		}
	#div01{
		padding-left:50px ;
		
		width: 245px;
		display: inline-block;
		float: left;
	}
	
	
	#renshu{
		display: inline-block;
		float: right;
	}
</style>
</head>
<body>
	
			<div id="portrait">
				<img src="${pageContext.request.contextPath}/${img}"/> 
			</div>
		<div id="div01">
			
			<div>
				<span>户名:${username}</span>
			</div>
			
			
			<input type="button" id="tuichu" value="注销登录" />
			<%-- <a href="${pageContext.request.contextPath}/login/login.jsp"  target="_top" >注销登录</a> --%>
			
		</div>
		
		<div id="renshu">
				目前在线人数：${rs}
		</div>
		
		
</body>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.4.4.js" ></script>
	<script type="text/javascript">
	
	/* http://localhost:8090/liuhao/login/login.jsp */
		
	/* 去注册 */
	
	$('#tuichu').click(function(){
			
			$.ajax({
				   type: "POST",
				   url: "http://localhost:8090/liuhao/user.do?method=quitmethod",
				  'data':{
					  'username':'${username}',
				  },
				   success: function(msg){
					  
					   /*  window.location.href=" http://localhost:8090/liuhao/login/login.jsp";  */
					  // window.opener=null;

					    window.open('http://localhost:8090/liuhao/login/login.jsp','_top');

					    window.close();
				   },
				   'dataType':'json'
				}); 
				
		});	
	
	
		$('#portrait').click(function(){
			
			window.location.href="${pageContext.request.contextPath}/fileupload/fileUpload.jsp ";
			
			 	
		});
	
		
	</script>
	
</html>
